package com.tcm.pay.mapper;

import com.tcm.pay.domain.pojo.SocialLogin;
import com.tcm.pay.domain.vo.TokenVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface SocialLoginMapper {
    int deleteByUserId(@Param("userId")Long userId, @Param("clientType") String clientType,
                       @Param("identityType") String identityType);

    int insert(SocialLogin record);

    SocialLogin findByUserId(Long userId, @Param("clientType") String clientType,
                             @Param("identityType") String identityType);

    TokenVo findTokenByUserId(@Param("userId")Long userId, @Param("clientType") String clientType,
                              @Param("identityType") String identityType);

    SocialLogin findByIdentifier(@Param("identifier") String identifier,
                                 @Param("identityType") String identityType,
                                 @Param("clientType") String clientType);

    int update(SocialLogin record);

    List<SocialLogin> listScialLoginPage(Map<String, Object> maps);

    int countScialLogin(Map<String, Object> maps);

}